<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test31</title>
</head>
<body>
    <script type="text/javascript">
        COUNT();
        function COUNT() {
            var count = 0;
            for(var i = 100; i<=200; i++){
                var a =parseInt(i/100);
                var b =parseInt(i%100/10) ;
                var c =parseInt(i%10) ;
                if (a==3){
                    count++;
                }
                if (b==3){
                    count++;
                }
                if (c==3){
                    count++;
                }
            }
            alert("100到200之间的整数一共有"+count+"个3");
        }
    </script>
</body>
</html>